/**
 * 
 */
package com.ofek.eventos.net.lks.test;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @author Ofek
 *
 */
public class LKSDebug {
	public static ExecutorService es = Executors.newSingleThreadExecutor();
	public static SimpleDateFormat simple = new SimpleDateFormat("HH:mm:ss.SSS");
	/**
	 * @param string
	 */
	public static void println(final String string) {
		final String str = "\n\n"+simple.format(new Date(System.currentTimeMillis())) +" " + Thread.currentThread().getName()+ ":\n " +string;
		synchronized (LKSDebug.es) {
			LKSDebug.es.execute(new Runnable() {

				@Override
				public void run() {
					System.out.println(str);
				}
			});

		}
	}
}
